/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.aaron.platform.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 *
 * @author mac
 */
@Entity
@Table(name = "itsc_role_info")
@SequenceGenerator(name="itsc_role_generator", sequenceName="itsc_role_generator", allocationSize = 1)
public class ItscRoleInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    public static final String PROPERTY_ROLE_NAME = "roleName";

    public static final String PROPERTY_ROLE_ID = "roleId";

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO, generator="itsc_role_generator")
    @Column(name = "role_id")
    private Integer roleId;

    @Column(name = "role_name")
    private String roleName;

    @Column(name = "role_desc")
    private String roleDesc;

    public ItscRoleInfo() {
    }

    public ItscRoleInfo(Integer roleId) {
        this.roleId = roleId;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getRoleDesc() {
        return roleDesc;
    }

    public void setRoleDesc(String roleDesc) {
        this.roleDesc = roleDesc;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (roleId != null ? roleId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ItscRoleInfo)) {
            return false;
        }
        ItscRoleInfo other = (ItscRoleInfo) object;
        if ((this.roleId == null && other.roleId != null) || (this.roleId != null && !this.roleId.equals(other.roleId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.aaron.test.entity.ItscRoleInfo[roleId=" + roleId + "]";
    }


}
